import { cbtPrint } from "hy-algokit";
import IHeap from "./IHeap";

class Heap<T> implements IHeap<T> {
  private _data: T[] = [];
  private _size: number = 0;

  insert(value: T): void {}
  extract(): T | undefined {
    return undefined;
  }
  peek(): T | undefined {
    return this._data[0];
  }
  isEmpty(): boolean {
    return this._size === 0;
  }
  get length(): number {
    return this._size;
  }
  build_heap(array: T[]): void {}
  print(): void {
    cbtPrint(this._data);
  }
}

const arr = [19, 100, 36, 17, 3, 25, 1, 2, 7];
const heap = new Heap<number>();

arr.forEach((item) => {
  heap.insert(item);
});

heap.print();

export {};
